
#import <Foundation/Foundation.h>
@class XMUploadResultModel;

typedef NS_ENUM(NSUInteger, XMUploadType) {
    XMUploadTypeImage = 1,
    XMUploadTypeAudio,
    XMUploadTypeVideo,
};

NS_ASSUME_NONNULL_BEGIN


@interface XMUploadManager : NSObject

+ (XMUploadManager *)sharedInstance;

- (void)setupCOSXMLShareService;

- (void)uploadImageArray:(NSArray<UIImage *> *)imageArray
               person_id:(NSString *)person_id
                complete:(void (^)(NSMutableArray<XMUploadResultModel *> *array))complete;


- (void)uploadWithFilePath:(NSString *)filePath
                      type:(XMUploadType)type
                 person_id:(NSString *)person_id
                  complete:(void (^)(XMUploadResultModel *result))complete;


/// 上传图片
/// - Parameters:
///   - image: 图片
///   - compress: 是否压缩
///   - person_id: person_id
///   - complete: 回调
- (void)uploadImage:(UIImage *)image
           compress:(BOOL)compress
          person_id:(NSString *)person_id
           complete:(void (^)(XMUploadResultModel *result))complete;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
